package com.yitiao.controller;

import com.yitiao.common.Result;
import com.yitiao.entity.dto.MainPageInfoDTO;
import com.yitiao.service.HeadLineShopCategoryCombineService;
import com.yitiao.spring.core.annotation.Controller;
import com.yitiao.spring.ioc.annotation.Autowired;
import lombok.Getter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Getter
@Controller
public class MainPageController {

    @Autowired
    private HeadLineShopCategoryCombineService headLineShopCategoryCombineService;

    public Result<MainPageInfoDTO> getMainPageInfo(HttpServletRequest req, HttpServletResponse resp){
        return headLineShopCategoryCombineService.getMainPageInfo();
    }

    public void throwException(){
        throw new RuntimeException("抛出异常测试");
    }
}
